<template>
    <mt-swipe :auto="0" :prevent='true' :stopPropagation='true' :speed="400" @change="handleChange">
        <mt-swipe-item v-for="(item, i) in banner" :key="item.course.id" >
            <router-link tag='img' to='/' :src="item.course.image_src_show" :alt="i">
            </router-link>
        </mt-swipe-item>
    </mt-swipe>
</template>

<script>
    import { Swipe, SwipeItem } from "mint-ui";
    export default {
        props: ['banner'],
        methods: {
            handleChange(index) {
                this.$emit('change',index)
            }
        },
        components: {
            [Swipe.name]: Swipe,
            [SwipeItem.name]: SwipeItem,
        }
    }
</script>

<style scoped>

</style>